﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.Hosting;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class message : System.Web.UI.Page
{
    public decimal faje = 0;
  
    protected void Page_Load(object sender, EventArgs e)
    {
        dingzhi();

    }
    
    private void dingzhi()
    {

        string sqlstr = "select total from [dbo].[UsersAccount]  where  user_id=" + Request["userID"];//当前账户总金额
        DataTable dingzhiJE = BLL.UsersAccount.GetPageListBysql(sqlstr); //UsersAccount表里加GetPageListBysql这个方法 


        string sqlstrys = "select  LotteryMoney,LotteryYE,MyGua from  [dbo].[LotteryChipped]   where  [ID]=" + Request["dingdanID"];//----定制详情(方案金额 方案剩余金额  方案进度 保底金额 )
        DataTable dingzhiDetails = BLL.LotteryChipped.GetPageListBysql(sqlstrys);


        string sql = "select  isnull(sum([DJJEmoney]),0) as allDJJEmoney from [dbo].[GenDanUser_temp] where [user_id]=" + Request["userID"];
        DataTable dingzhidjzje = BLL.GenDanUser_temp.GetPageListBysql(sql); //根据用户冻结金额，根据方案ID

        Response.Write("{\"JE\":\"" + dingzhiJE.Rows[0]["total"].ToString() + "\",\"FADJJE\":\"" + dingzhidjzje.Rows[0]["allDJJEmoney"].ToString() + "\",\"FAJE\":\"" + dingzhiDetails.Rows[0]["LotteryMoney"].ToString() + "\",\"FAYE\":\"" + dingzhiDetails.Rows[0]["LotteryYE"].ToString() + "\",\"FABD\":\"" + dingzhiDetails.Rows[0]["MyGua"].ToString() + "\"}");
       
    }

}
    
           

